import { useTranslation } from 'react-i18next';
import Button from 'src/component/Button';
import Modal from 'src/component/Modal';
import style from './CancelModal.module.scss';

type Props = {
  open: boolean;
  onClose: () => void;
  onSubmit: () => void;
};

const CancelModal = ({ open, onClose, onSubmit }: Props) => {
  const { t } = useTranslation();

  return (
    <Modal open={open} handleClose={onClose}>
      <div>
        <div>是否要取消此提领？</div>
        <div className={style.buttons}>
          <Button appearance="outlined" onClick={onClose} type="button">
            暂不取消
          </Button>
          <Button type="button" onClick={onSubmit}>
            确认取消
          </Button>
        </div>
      </div>
    </Modal>
  );
};

export default CancelModal;
